Breadcrumbs:
Deployment
On this page
Now that you’ve built a web site with Eleventy (even if it’s one HTML page!) you might be ready to put it on the web for everyone to see! There are a bunch of different ways to do it!
A standard Eleventy build (e.g. running npx @11ty/eleventy
) is a production-ready build by default . Eleventy doesn’t change its build behavior internally for development versus production.
If you want to customize Eleventy to do your own local development/production optimizations, environment variables are a common solution to accomplish that goal.
Providers
Take a look at the list below for some ideas on where to deploy your Eleventy project. There are many deployment options available and this is not meant to be an exhaustive list.
Jamstack Providers
Jamstack providers can trigger your Eleventy build command automatically when you commit a file to your source control repository (GitHub, GitLab, Codeberg, etc.) and deploy Eleventy’s build output directory for you.
Use an npm Script
One common practice when deploying Eleventy via a Jamstack provider is to use an npm script to run your build command. This is configured in your package.json
file and could look like this:
Filename package.json
{ "scripts" : { "build" : "npx @11ty/eleventy" } }
This allows you to configure your host to run npm run build
and allows you to make future changes to that command in your code and not the host’s configuration.
Classic Web Hosts
Eleventy can work with any web host that supports static files!
With these hosts deployment is not automatically triggered for you, so after you run the Eleventy build command you’ll need to upload your Eleventy output directory (defaults to _site
) to the host manually.
This is a great place to start if you’re not familiar with source control (e.g. git or GitHub).
Edit on the Web
There are some great Web editors popping up that you can use to run and edit Eleventy projects online! Here are some options:
Persisting Cache
The .cache
folder is used by the Eleventy Fetch plugin (and Eleventy Image ) to avoid repeating costly network requests. On your hosting provider’s build server, this folder will typically be empty when you start a build, because you definitely are not checking in your .cache
folder to git
(right?) .
Some Jamstack providers have additional features to persist this folder between builds, re-useing the cache and speeding up build times. Here are a few of these:
Speed up Eleventy Image
Additionally, if you’re writing your Eleventy Image output to your Eleventy output directory (e.g. ./_site/img/
) (and not checking those files into git
), you can persist this folder as well to reuse the Eleventy Image disk cache to improve build times.
Mini-Tutorials
Deploy an Eleventy project to GitHub pages
Includes persisted cache across builds. Using peaceiris/actions-gh-pages
.
Go to your repository’s Settings on GitHub.
In the GitHub Pages section change:Source: Deploy from a branch
Branch: gh-pages/(root)
Add "build-ghpages" command to your package.json
scripts section
"scripts" : { "build-ghpages" : "npx @11ty/eleventy --pathprefix=/your-repo-name/" , }
Create a new GitHub workflow file in .github/workflows/deploy-to-ghpages.yml
name : Deploy to GitHub Pageson : push : branches : - main pull_request : jobs : deploy : runs-on : ubuntu- 22.04 permissions : contents : write concurrency : group : ${ { github.workflow } } - ${ { github.ref } } steps : - uses : actions/checkout@v3 - name : Setup Node uses : actions/setup- node@v3 with : node-version : "18" - name : Persist npm cache uses : actions/cache@v3 with : path : ~/.npm key : ${ { runner.os } } - node- ${ { hashFiles('**/package.json') } } - name : Persist Eleventy .cache uses : actions/cache@v3 with : path : ./.cache key : ${ { runner.os } } - eleventy- fetch- cache - run : npm install - run : npm run build- ghpages - name : Deploy uses : peaceiris/actions- gh- pages@v3 if : github.ref == 'refs/heads/main' with : github_token : ${ { secrets.GITHUB_TOKEN } } publish_dir : ./_site
Using netlify-plugin-cache
to persist cache
Using netlify-plugin-cache
.
npm install netlify-plugin-cache
Add the following to your netlify.toml
configuration file
[ [ plugins ] ] package = "netlify-plugin-cache" [ plugins.inputs ] paths = [ ".cache" ]
×97 resources via 11tybundle.dev curated by Bob Monsour .
Expand to see 92 more resources.
Journal Eleventy, présentation et mini-tutoriel — Joris R (2025)
I moved my website to CloudFlare Pages, here’s why — Rob O'Leary (2025)
Static site deployments made easy with Github Actions and Tailscale — Tailscale (2025)
Host Your Stuff — Scarlett Cavendish (2025)
Set Up a Simple and Reliable Static Site Generator Using 11ty (Eleventy) + Tailwind CSS — Abdullah Yahya (2025)
Integrating Eleventy with Buttondown to create subscribers-only content — Scott Andrew (2025)
Building a seasonal veg app with Eleventy. Part 5 - Scheduled functions with Netlify — Yasmin (2025)
Making static sites with Glitch and 11ty: Image gallery — Stefan Bohacek (2025)
Building a seasonal veg app with Eleventy. Part 3 - Deploy with Netlify — Yasmin (2025)
The Speed Trifecta: 11ty, Brotli 11, and CSS Fingerprinting — Matt Hobbs (2025)
Build personal blog easy with 11ty.js — Hieu Le Van (2025)
Cranking Brotli up to 11 with Cloudflare Pro and 11ty — Matt Hobbs (2025)
HTTP 301 redirects in Eleventy — Dan Burzo (2024)
Dec 9: Building a blog — Callum Skeet (2024)
Rebuilding your Netlify site at regular intervals — Cory Dransfeldt (2024)
Static website hosting with Cloudflare pages — Saulius Zukauskas (2024)
Dynamic pages with 11ty and Cloudflare workers — Cory Dransfeldt (2024)
Using Coolify for deploying 11ty — Lewis Dale (2024)
11ty upgrading node in netlify — Simon Cox (2024)
Digital Notebook - Project Notes — Sam Feldstein (2024)
Prairie Rose Arena - Project Notes — Sam Feldstein (2024)
My Decap CMS setup with 11ty hosted on Cloudflare Pages — Patrick Grey (2024)
I Moved to Cloudflare — Aleksandr Hovhannisyan (2024)
Tips for Running 11ty on Cloudflare Pages — Cassey Lottman (2024)
Migrating from Netlify to Cloudflare for AI bot protection — Sia Karamalegos (2024)
Deploying on Netlify with Apple’s Shortcuts — Jim Nielsen (2024)
Building a Euros sweepstake website with 11ty — Rob Wood (2024)
Scheduled posts and deployments with 11ty — Nicki Hoffman (2024)
11ty and Obsidian Template for Solo Play — Alex Ward (2024)
Scheduling Posts with a Static Site — Alex Hyett (2024)
Eleventy adoption guide: Overview, examples, and alternatives — Nelson Michael (2024)
Deploying An 11ty Project To Shared Hosting — fLaMEd (2024)
Deploy a Static Website to AWS S3 with Official GitHub Actions — Lucas Cantor (2024)
Fixing a typo shaved 4 minutes off my Netlify build time — Thomas Rigby (2024)
Creating a Reading List with Eleventy and Omnivore — Tom Doe (2024)
Automate Your Static Site Rebuilds with Netlify Scheduled Functions — Marc Littlemore (2024)
Eleventy: pathPrefix and GitHub Pages — Łukasz Wójcik (2024)
Deploy an Eleventy site to Cloudflare Pages efficiently with GitHub's action cache — Jonas Brusman (2024)
Automatic Mastodon post embeds — Cory Dransfeldt (2024)
Eleventy - Differentiate between dev and production builds with unique favicons — Rob O'Leary (2024)
Buttondown with 11ty on Netlify with GitHub — Jay Cuthrell (2024)
How I deploy my Eleventy site to Neocities — Sophie Koonin (2024)
Cloudflare Pages Cron Deploys — Jeff Sheets (2024)
Cloudflare _redirects — Jeff Sheets (2024)
A Simple Guide to Redirects on Neocities with Eleventy — fLaMEd (2024)
Deploy 11ty Site Using Rsync — Moritz Giessmann (2024)
Deploying my website — Tobias Fedder (2023)
ELEVENTY V3 WITH ESM SUPPORT NOW ON THE CANARY CHANNEL — Zach Leatherman (2023)
Automating my site update with gitlab ci/cd — Grigør (2023)
Migrating from WordPress to Eleventy (part 4) — Carlos Araya (2023)
How to schedule posts in Eleventy — Sophie Koonin (2023)
My Neocities workflow: using Eleventy and the CLI to speed up development — Whiona (2023)
Seven Million npm Downloads — 11ty (2023)
TinaCMS + 11ty — Clayton Errington (2023)
Speed up your CloudCannon Builds with Preserved Paths — CloudCannon (2023)
Scheduling Automatic Builds with Static Site Generators — Clayton Errington (2023)
CloudCannon + Eleventy — Clayton Errington (2023)
From Zero to CMS in 2 Minutes with CloudCannon and Eleventy — CloudCannon (2023)
Deploying an 11ty Site to GitHub Pages Using GitHub Actions — Jonathan Snook (2023)
Fetching webmentions with Netlify and Eleventy Edge — Martin Schneider (2023)
Remove trailing slash on 11ty S3 hosted sites using Cloudfront function — Martin Hicks (2023)
Cloudflare Pages error with 11ty build — Simon Cox (2023)
Blogging on the Jamstack with Netlify & Eleventy — David Darnes (2023)
GitLab CI Pipeline for Eleventy — Aaron Goldenthal (2023)
Netlify Eleventy Build Failire — John M. Wargo (2023)
Scheduled Eleventy builds on Vercel with cron-triggered GitHub actions — Cory Dransfeldt (2023)
Using the Codeberg CI — Clayton Errington (2023)
Rebuilding 11ty on a schedule — James Doc (2023)
Setup GitLab Review Apps with Eleventy — Aaron Goldenthal (2023)
Hassle-free internationalization with Eleventy 2.0 and Netlify — Lene Saile (2023)
Cheaply Rebuilding an 11ty site on Netlify — Benny Powers (2023)
Post previews with Ghost, Eleventy & Netlify — David Darnes (2023)
Letting Eleventy Schedule Its Own Builds — Luke Bonaccorsi (2022)
Testing the Netlify Cache Plugin with Eleventy — Raymond Camden (2022)
Static site delivery automation with Eleventy & Buddy — Buddy (2022)
Add Build Info to an 11ty Site — Aleksandr Hovhannisyan (2022)
Hosting Eleventy on GitHub Pages — Quinn Dombrowski (2022)
Building blocks for my first Eleventy site — Sami Määttä (2022)
Automatic Eleventy (11ty) Site Updates with Github Hooks — Joonas Pihlajamaa (2022)
How to Create and Deploy Your First Eleventy Website — Ayooluwa Isaiah (2021)
Turn static HTML/CSS into a blog with CMS using the JAMStack — Kevin Powell (2021)
Deploying an 11ty Site to Azure Static Web Apps — Chad Schulz (2021)
Get your Eleventy Site into the real world using a hosting provider like Netlify or Git pages — Mike Street (2021)
Using Cloudflare workers to publish your scheduled 11ty posts — Mike Street (2021)
Quick Tips for Eleventy and Vercel — Raymond Camden (2021)
Trigger a Netlify build every day with IFTTT — 11ty (2021)
How To Deploy an Eleventy Site to Github Pages with a Custom Domain — Justus Grunow (2020)
Testing my Eleventy-website with Cypress and Netlify — Martin Schneider (2020)
Building a website with a static site generator, part 1: Setup — Juha-Matti Santala (2020)
Using eleventy — Carlos Araya (2019)
Deploying an 11ty Site to GitHub Pages — Jonathan Snook (2019)
Deploy a free Gatsby, Hugo, or Eleventy website template in 30 seconds — Phil Hawksworth (2018)
Other pages in Services